package com.example.zx_springboot.service.iml;

import com.example.zx_springboot.entity.ZxResource;
import com.example.zx_springboot.mapper.Zx_MenuMapper;
import com.example.zx_springboot.service.ZxMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ZxMenuiml implements ZxMenuService {
@Autowired
private Zx_MenuMapper zx_menuMapper;
    @Override
    public List<ZxResource> getall() {
        return zx_menuMapper.getall();
    }

    @Override
    public void addmenu(ZxResource zxResource) {
        zx_menuMapper.add(zxResource);
    }

    @Override
    public void updatemenu(ZxResource zxResource) {
        zx_menuMapper.update(zxResource);
    }

    @Override
    public void deletemenu(Integer resource_id) {
        zx_menuMapper.delete(resource_id);
    }

    @Override
    public void delettemenus(List<Integer> ids) {
        for (Integer resource_id : ids) {
            // 进行删除操作，可以调用你的删除方法
            zx_menuMapper.deletes(resource_id);
        }
    }
}
